home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
051-075
/
scopedisk62
/
vt100v2.8a
/
2.8to2.8a
< prev
next >
Wrap
Text File
|
1995-03-19
|
15KB
|
553 lines
Prereq: 880117
diff -c old/init.c new/init.c
*** old/init.c Sat May 28 00:40:16 1988
--- new/init.c Sat May 28 00:27:09 1988
***************
*** 1,7 ****
/***************************************************************
* vt100 - terminal emulator - initialization
*
! * v2.8 880117 ACS - See the README file
* v2.7 870825 ACS - Allow execution of all script files specified on
* command line (companion to changes in script.c).
* Rolled menu init into one routine (do_menu_init()).
--- 1,9 ----
/***************************************************************
* vt100 - terminal emulator - initialization
*
! * v2.8a 880510 ACS - Allow lines 0 in init file to *really* mean
! * "use all available lines".
! * v2.8 880117 ACS - See vt100.doc.
* v2.7 870825 ACS - Allow execution of all script files specified on
* command line (companion to changes in script.c).
* Rolled menu init into one routine (do_menu_init()).
***************
*** 211,218 ****
char **argv;
{
FILE *fd = NULL;
! char *p, *t, *ifile;
! int l, dont_init = 0;
doing_init = 1; /* make sure we only allow INIT script commands */
if (argc > 1) {
--- 213,220 ----
char **argv;
{
FILE *fd = NULL;
! char *p = NULL, *t, *ifile;
! int l, dont_init = 0, lines0, maxrows;
doing_init = 1; /* make sure we only allow INIT script commands */
if (argc > 1) {
***************
*** 277,295 ****
cleanup("can't open graphics library",2);
/* Now set up all the screen info as necessary */
! if(p_lines == 0) /* Wants to use everything available */
! if(p_interlace)
! p_lines = ((GfxBase->NormalDisplayRows*2) - 6) / 8;
! else
! p_lines = ((GfxBase->NormalDisplayRows - 6) / 8);
if (p_interlace == 0) {
! if (p_lines > 24) p_lines = 24;
MINY = 14;
NewWindow.Height = (long)((p_lines*8)+8);
}
else {
! if (p_lines > 48) p_lines = 48;
MINY = 16;
NewScreen.ViewModes |= LACE;
NewWindow.Height = (long)((p_lines*8)+10);
--- 279,301 ----
cleanup("can't open graphics library",2);
/* Now set up all the screen info as necessary */
! maxrows = GfxBase->NormalDisplayRows;
! if((p_screen == 0) && ((IntuitionBase->ViewLord.Modes & LACE) == 0))
! p_interlace = 0;
+ if(p_interlace)
+ maxrows *= 2;
+
+ if(lines0 = (p_lines == 0)) /* Wants to use everything available */
+ p_lines = (maxrows - 6) / 8;
+
if (p_interlace == 0) {
! if (!lines0 && p_lines > 24) p_lines = 24;
MINY = 14;
NewWindow.Height = (long)((p_lines*8)+8);
}
else {
! if (!lines0 && p_lines > 48) p_lines = 48;
MINY = 16;
NewScreen.ViewModes |= LACE;
NewWindow.Height = (long)((p_lines*8)+10);
***************
*** 310,318 ****
NewScreen.Height = (long)((p_lines*8)+16);
if (p_interlace == 1)
! NewScreen.TopEdge = (long)(400 - NewScreen.Height);
else
! NewScreen.TopEdge = (long)(208 - NewScreen.Height);
}
else {
p_depth = 2L;
--- 316,324 ----
NewScreen.Height = (long)((p_lines*8)+16);
if (p_interlace == 1)
! NewScreen.TopEdge = (long)(maxrows - NewScreen.Height);
else
! NewScreen.TopEdge = (long)((maxrows+8) - NewScreen.Height);
}
else {
p_depth = 2L;
***************
*** 324,330 ****
}
/* see if we exit with a startup script */
! if (*p == 'e') {
p = next_wrd(p+l+1,&l);
if (*p) return(p);
}
--- 330,336 ----
}
/* see if we exit with a startup script */
! if (p && *p == 'e') {
p = next_wrd(p+l+1,&l);
if (*p) return(p);
}
Prereq: 880117
diff -c old/kermit.c new/kermit.c
*** old/kermit.c Sat May 28 00:40:16 1988
--- new/kermit.c Sat May 28 00:27:09 1988
***************
*** 1,7 ****
/*************************************************************
* vt100 terminal emulator - KERMIT protocol support
*
! * v2.8 880117 ACS - See the README file
* v2.7 870825 ACS - Fixed the "multiple-send" problem in
* doksend() et al; show status using the *InfoMsg*()
* routines in window.c; fixed erroneous calls to
--- 1,8 ----
/*************************************************************
* vt100 terminal emulator - KERMIT protocol support
*
! * v2.8a 880510 ACS - saybye() will allocate packet buffers if it must.
! * v2.8 880117 ACS - See vt100.doc.
* v2.7 870825 ACS - Fixed the "multiple-send" problem in
* doksend() et al; show status using the *InfoMsg*()
* routines in window.c; fixed erroneous calls to
***************
*** 76,83 ****
rptq, /* Quote character for repeats */
ebq, /* Quote character for 8th bit quoting */
ackpkt[MAXPACKSIZ+20], /* ACK/NAK packet buffer */
! *msgpkt, /* Message Packet buffer is AllocMem()d */
! *spackbuf, /* Dynamically allocated buffer for spack() */
filnam[40], /* remote file name */
snum[10],
mainmode[10];
--- 77,84 ----
rptq, /* Quote character for repeats */
ebq, /* Quote character for 8th bit quoting */
ackpkt[MAXPACKSIZ+20], /* ACK/NAK packet buffer */
! *msgpkt = NULL, /* Message Packet buffer is AllocMem()d */
! *spackbuf = NULL, /* Dynamically allocated buffer for spack() */
filnam[40], /* remote file name */
snum[10],
mainmode[10];
***************
*** 152,157 ****
--- 153,159 ----
free_expand(list);
FreeMem(spackbuf, (long)(MAXLONGPKS+20));
FreeMem(msgpkt, (long)(MAXLONGPKS+20));
+ msgpkt = spackbuf = NULL;
return(TRUE);
}
***************
*** 174,179 ****
--- 176,182 ----
retval = recsw();
FreeMem(spackbuf, (long)(MAXLONGPKS+20));
FreeMem(msgpkt, (long)(MAXLONGPKS+20));
+ msgpkt = spackbuf = NULL;
return(retval);
}
***************
*** 977,987 ****
saybye()
{
! int len,num;
if(numreqs != 0) /* Requester's up... */
Delay(5L); /* ...so wait for Intuition, just in case. */
spack('G',n,1,"F"); /* shut down server no more files */
rpack(&len,&num,ackpkt);
}
print_our_err()
--- 980,1003 ----
saybye()
{
! int len,num, gotmem = 0;
!
! if(msgpkt == NULL) { /* No msgpkt buffer... */
! msgpkt = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
! spackbuf = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
! gotmem = 1;
! }
!
if(numreqs != 0) /* Requester's up... */
Delay(5L); /* ...so wait for Intuition, just in case. */
spack('G',n,1,"F"); /* shut down server no more files */
rpack(&len,&num,ackpkt);
+
+ if(gotmem) {
+ FreeMem(spackbuf, (long)(MAXLONGPKS+20));
+ FreeMem(msgpkt, (long)(MAXLONGPKS+20));
+ msgpkt = spackbuf = NULL;
+ }
}
print_our_err()
Prereq: 880117
diff -c old/script.c new/script.c
*** old/script.c Sat May 28 00:40:16 1988
--- new/script.c Sat May 28 00:27:09 1988
***************
*** 1,7 ****
/*************************************************************
* vt100 terminal emulator - Script file support
*
! * v2.8 880117 ACS - See the README file
* v2.7 870825 ACS - Wait for the reply from AbortIO().
* Use the *InfoMsg*() routines in window.c. Provide
* for multiple script files on command line
--- 1,8 ----
/*************************************************************
* vt100 terminal emulator - Script file support
*
! * v2.8a 880510 ACS - Allow comments on XPROTO and FONT.
! * v2.8 880117 ACS - See vt100.doc.
* v2.7 870825 ACS - Wait for the reply from AbortIO().
* Use the *InfoMsg*() routines in window.c. Provide
* for multiple script files on command line
***************
*** 866,884 ****
void cmd_xproto(par)
char *par;
{
! int i, l = strlen(par);
char temp[40];
! /* downcase the parameter */
! for(i=0; i<l; i++) par[i] |= ' ';
p_xproto = MODEMAX + 1; /* Establish a default */
! for(i=0; i<MODEMAX; i++) {
! if(strcmp(par, &(*(xprotos[i]))) == 0) {
! p_xproto = i;
! break;
! }
}
if(p_xproto >= MODEMAX) {
p_xproto = MODEMAX - 1;
--- 867,890 ----
void cmd_xproto(par)
char *par;
{
! int i, len;
char temp[40];
! next_wrd(par, &len);
p_xproto = MODEMAX + 1; /* Establish a default */
! if(len) {
! par[len] = '\0';
!
! /* downcase the parameter */
! for(i=0; i<len; i++) par[i] |= ' ';
!
! for(i=0; i<MODEMAX; i++)
! if(strcmp(par, &(*(xprotos[i]))) == 0) {
! p_xproto = i;
! break;
! }
}
if(p_xproto >= MODEMAX) {
p_xproto = MODEMAX - 1;
***************
*** 890,896 ****
else
InfoMsg2Line("Script:", temp);
}
! if(doing_init == 0) redofile();
}
void cmd_numkey(par)
--- 896,902 ----
else
InfoMsg2Line("Script:", temp);
}
! if(!doing_init) redofile();
}
void cmd_numkey(par)
***************
*** 958,980 ****
void cmd_font(par)
char *par;
{
! char temp[80];
/* myfontname has been initialized from p_font in InitDefaults() in
** init.c */
! if(*par) {
! if(strlen(par) < MAXFONTVARLEN) {
! strcpy(myfontname, par);
! strcat(myfontname,FONTSUFFIX);
! }
! else {
! puts("Init:");
! sprintf(temp, "Font specification too long, \"%s\" used", myfontname);
! puts(temp);
! }
}
myattr.ta_Name = (STRPTR)myfontname;
}
void cmd_inter(par)
--- 964,994 ----
void cmd_font(par)
char *par;
{
! char temp[80];
! int len;
+ next_wrd(par, &len);
+
+ temp[0] = '\0';
+
/* myfontname has been initialized from p_font in InitDefaults() in
** init.c */
! if(!len)
! sprintf(temp, "Init:\nNo font specified, \"%s\" used", myfontname);
! else {
! if(*par && len) {
! if(len < MAXFONTVARLEN) {
! par[len] = '\0';
! strcpy(myfontname, par);
! strcat(myfontname,FONTSUFFIX);
! } else
! sprintf(temp, "Init:\nFont specification too long, \"%s\" used", myfontname);
! }
}
myattr.ta_Name = (STRPTR)myfontname;
+ if(*temp)
+ puts(temp);
}
void cmd_inter(par)
Prereq: 880117
diff -c old/vt100.c new/vt100.c
*** old/vt100.c Sat May 28 00:40:16 1988
--- new/vt100.c Sat May 28 00:27:09 1988
***************
*** 1,7 ****
/********************************************************************
* vt100 terminal emulator with xmodem transfer capability
*
! * v2.8 880117 ACS - See the README file
* v2.7 870825 ACS - Provide handling of the msgs from the
* info/status window.
* v2.6 870227 DBW - bug fixes for all the stuff in v2.5
--- 1,8 ----
/********************************************************************
* vt100 terminal emulator with xmodem transfer capability
*
! * v2.8a 880510 ACS - Don't ReplyMsg too soon.
! * v2.8 880117 ACS - See vt100.doc.
* v2.7 870825 ACS - Provide handling of the msgs from the
* info/status window.
* v2.6 870227 DBW - bug fixes for all the stuff in v2.5
***************
*** 406,412 ****
qual = NewMessage->Qualifier;
if(class == RAWKEY)
iaddr = *((APTR *)NewMessage->IAddress);
! ReplyMsg( NewMessage );
switch( class )
{
case CLOSEWINDOW:
--- 407,414 ----
qual = NewMessage->Qualifier;
if(class == RAWKEY)
iaddr = *((APTR *)NewMessage->IAddress);
! else
! ReplyMsg( NewMessage );
switch( class )
{
case CLOSEWINDOW:
***************
*** 415,420 ****
--- 417,423 ----
case RAWKEY:
len = toasc(&(ascstr[0]), code,qual, 100, iaddr, 0);
+ ReplyMsg( NewMessage );
if (p_echo) {
ptr = &(ascstr[0]);
for(i = 0; i < len; i++)
Prereq: 880117
diff -c old/vt100.h new/vt100.h
*** old/vt100.h Sat May 28 00:40:16 1988
--- new/vt100.h Sat May 28 00:27:10 1988
***************
*** 1,7 ****
/*********************************************************************
* a terminal program that has ascii and xmodem transfer capability
*
! * v2.8 880117 ACS - See the README file
* v2.7 870825 ACS - See README.
* v2.6 870227 DBW - bug fixes for all the stuff in v2.5
* v2.5 870214 DBW - more additions (see readme file)
--- 1,7 ----
/*********************************************************************
* a terminal program that has ascii and xmodem transfer capability
*
! * v2.8a 880510 ACS - Update title to 2.8A.
* v2.7 870825 ACS - See README.
* v2.6 870227 DBW - bug fixes for all the stuff in v2.5
* v2.5 870214 DBW - more additions (see readme file)
***************
*** 21,27 ****
********************************************************************/
/********* major version (used for title of terminal window) *********/
! #define VERSION "VT100 (V2.8 ACS 880117) Terminal Window"
/*********** ######## define the compiler type here ######## ********/
#define LATTICE 0
--- 21,27 ----
********************************************************************/
/********* major version (used for title of terminal window) *********/
! #define VERSION "VT100 (V2.8A ACS 880510) Terminal Window"
/*********** ######## define the compiler type here ######## ********/
#define LATTICE 0
diff -c old/Makefile new/Makefile
*** old/Makefile Sat May 28 00:40:15 1988
--- new/Makefile Sat May 28 00:27:09 1988
***************
*** 2,7 ****
--- 2,8 ----
#
# Makefile to build vt100 terminal emulator
#
+ # v2.8a 880510 ACS - Add CFLAGS and LNFLAGS
# v2.8 880117 ACS - See the README file
# v2.7 870825 ACS - See the README file
# v2.6 870227 DBW - bug fixes for all the stuff in v2.5
***************
*** 18,23 ****
--- 19,29 ----
#
# Don't forget to define the right compiler (MANX or LATTICE) in VT100.H
#
+ # Say:
+ # make CFLAGS=-n LNFLAGS=-g vt100 -or-
+ # make CFLAGS=-n LNFLAGS=-g vt100-w
+ # for Manx SDB.
+ #
######################################################################
OBJS = vt100.o init.o window.o xmodem.o remote.o \
***************
*** 24,57 ****
kermit.o script.o expand.o
vt100 : vt100.syms $(OBJS)
! ln -o vt100 $(OBJS) -lc
vt100-w : vt100.syms $(OBJS)
! ln -w -o vt100-w $(OBJS) -lc
vt100.syms : vt100.h
! cc -A +Hvt100.syms vt100.h
vt100.o : vt100.c
! cc +Ivt100.syms vt100.c
init.o : init.c
! cc +Ivt100.syms init.c
window.o : window.c
! cc +Ivt100.syms window.c
xmodem.o : xmodem.c
! cc +Ivt100.syms xmodem.c
remote.o : remote.c
! cc +Ivt100.syms remote.c
kermit.o : kermit.c
! cc +Ivt100.syms kermit.c
script.o : script.c
! cc +Ivt100.syms script.c
expand.o : expand.c
! cc +Ivt100.syms expand.c
--- 30,63 ----
kermit.o script.o expand.o
vt100 : vt100.syms $(OBJS)
! ln +q -o vt100 $(OBJS) -lc
vt100-w : vt100.syms $(OBJS)
! ln +q $(LNFLAGS) -o vt100-w $(OBJS) -lc
vt100.syms : vt100.h
! cc -A +Hvt100.syms $(CFLAGS) vt100.h
vt100.o : vt100.c
! cc +Ivt100.syms $(CFLAGS) vt100.c
init.o : init.c
! cc +Ivt100.syms $(CFLAGS) init.c
window.o : window.c
! cc +Ivt100.syms $(CFLAGS) window.c
xmodem.o : xmodem.c
! cc +Ivt100.syms $(CFLAGS) xmodem.c
remote.o : remote.c
! cc +Ivt100.syms $(CFLAGS) remote.c
kermit.o : kermit.c
! cc +Ivt100.syms $(CFLAGS) kermit.c
script.o : script.c
! cc +Ivt100.syms $(CFLAGS) script.c
expand.o : expand.c
! cc +Ivt100.syms $(CFLAGS) expand.c